We want to remove the temporary folder independently from whether the
update succeeded or failed, so we currently remove it from a `finally`
statement. Unfortunately that operation can fail as well, in which
case we don't catch it and the exception interferes with startup.
Fix this by removing the folder in a separate catch statement instead.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8417
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3721>
FileUtils.recursivelyMoveDir(dir, extensionDir);
} catch {
log(`Failed to install extension updates for ${uuid}`);
- } finally {
+ }
+
+ try {
FileUtils.recursivelyDeleteDir(dir, true);
+ } catch (e) {
+ console.error(`Failed to delete extension update: ${e.message}`);
}
}
}